package com.anta.crm.codegen.plus;

import com.anta.crm.codegen.constants.CodeGenConst;
import org.mybatis.generator.api.IntrospectedTable;
import org.mybatis.generator.api.PluginAdapter;

import java.util.List;

public class AttributesPlugin extends PluginAdapter {
    @Override
    public boolean validate(List<String> warnings) {
        return true;
    }
    
    @Override
    public void initialized(IntrospectedTable introspectedTable) {
        introspectedTable.setBaseColumnListId(CodeGenConst.selectSqlStatementId);
        introspectedTable.setBaseResultMapId(CodeGenConst.resultMapStatementId);
        introspectedTable.setSelectByPrimaryKeyStatementId(CodeGenConst.selectByIdStatementId);
        introspectedTable.setDeleteByPrimaryKeyStatementId(CodeGenConst.delByIdStatementId);
    }
}
